package com.von.springbootnetty;

import com.von.springbootnetty.config.NettyServer;
import org.springframework.boot.WebApplicationType;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.context.ConfigurableApplicationContext;
/**
 * @author xiaosai
 * @version 1.0
 * @date 2022/3/17 13:54:14
 * @describe
 * @className
 */
@SpringBootApplication
public class SpringBootNettyApplication{

    public static void main(String[] args) {
        //ConfigurableApplicationContext applicationContext = new SpringApplicationBuilder(SpringBootNettyApplication.class).run(args);
        ConfigurableApplicationContext applicationContext = new SpringApplicationBuilder(SpringBootNettyApplication.class).web(WebApplicationType.NONE).run(args);
        NettyServer nettyServer = applicationContext.getBean(NettyServer.class);
        nettyServer.start();
    }
}
